how to find mean of each category